From c526d560a3e8ed9b2dc9a23825b8979c00a152ba Mon Sep 17 00:00:00 2001 From: Factiven Date: Mon, 1 May 2023 01:09:33 +0700 Subject: Update v3.5 > Bug Fixes > Editor List Update v0.8 > Display adjustment on search page --- pages/anime/[...id].js | 78 +++++++++++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 33 deletions(-) (limited to 'pages/anime/[...id].js') diff --git a/pages/anime/[...id].js b/pages/anime/[...id].js index 712197e..26c42cb 100644 --- a/pages/anime/[...id].js +++ b/pages/anime/[...id].js @@ -165,6 +165,7 @@ export default function Info() { ); // const [log, setLog] = useState(null); + // console.log(rec); useEffect(() => { const defaultState = { @@ -181,6 +182,7 @@ export default function Info() { // Reset all state variables to their default values Object.keys(defaultState).forEach((key) => { + document.body.style.overflow = "auto"; const value = defaultState[key]; if (Array.isArray(value)) { value.length @@ -341,7 +343,7 @@ export default function Info() { handleClose()}>
{!session && ( -
+

Edit your list

@@ -358,7 +360,7 @@ export default function Info() {
)} - {session && loading && ( + {session && loading && info && ( {info ? (
-
- {info?.episodes} Episodes -
-
- {info?.startDate?.year} -
-
- {info?.averageScore}% -
-
- {info?.type} -
-
- {info?.status} -
+ {info?.episodes && ( +
+ {info?.episodes} Episodes +
+ )} + {info?.startDate?.year && ( +
+ {info?.startDate?.year} +
+ )} + {info?.averageScore && ( +
+ {info?.averageScore}% +
+ )} + {info?.type && ( +
+ {info?.type} +
+ )} + {info?.status && ( +
+ {info?.status} +
+ )}
- {rec && ( + {info && rec?.length !== 0 && (